BIN=mypro
CC=g++
SRC=$(wildcard *.c)
OBJ=$(SRC:.c=.o)
LFLAGS=-o
FLAGS=-c
RM=rm -f

$(BIN):$(OBJ)
	@$(CC) $^ $(LFLAGS) $@
	@echo "linkin ... $^ to $@"
%.o:%.c
	@$(CC) $(FLAGS) $<
	@echo "comping ... $< to $@"
.PHONY:clean
clean:
	@$(RM) $(OBJ) $(BIN)
